#ifndef MODULEHPLCDEFINE_H
#define MODULEHPLCDEFINE_H

#include <QString>
#include <QVector>
#include "baseprotocol.h"

namespace hplc
{

enum ComType
{
    ComType_Serial = 0,
    ComType_Lan,
};

enum NetType
{
    NetType_UDP = 0,
    NetType_TCPServer,
    NetType_TCPClient,
};

enum DriverType
{
    DriverType_TMC5160 = 0,
    DriverType_PulseDir,
};

struct CommonParam
{
    CommonParam()
    {
        input.resize(8);
        output.resize(8);
    }

    QString			superPassword;

    QString 		softwareVersion;
    QString 		hardwareVersion;
    QString			productDate;
    QString			serialNumber;
    QString         modelString;

    quint32			usedTime;
    quint32			syncTime;
    QVector<bool>	input;
    QVector<bool>	output;

    quint8          tickPeriod;

    quint8          errorCodeUploadFreq;
    quint8			errorCode;


    QString         devName; // 设备名称
    quint8          devAddress; // 设备地址
    ProtocolType    protocol; // 通信协议
};

}
Q_DECLARE_METATYPE(hplc::CommonParam)

#endif // MODULEHPLCDEFINE_H
